if checkInsertion(OBJref, dragThis, scoreThis) then
doInsertAttr()
return 1
else
return 0
end if
CursorandUpdate()
end
on constrainLoc myLoc, constrainRect
if not inside(myLoc, constrainRect) then
set H to getAt(myLoc, 1)
set V to getAt(myLoc, 2)
if H < getAt(constrainRect, 1) then
set H to getAt(constrainRect, 1)
end if
if H > getAt(constrainRect, 3) then
set H to getAt(constrainRect, 3)
end if
if V < getAt(constrainRect, 2) then
set V to getAt(constrainRect, 2)
end if
if V > getAt(constrainRect, 4) then
set V to getAt(constrainRect, 4)
end if
return point(H, V)
end if
return myLoc
end
on checkInsertion OBJref, dragThis, scoreThis
if intersect(the rect of sprite getaProp(getaProp(gObjects, dragThis), #SpriteNum), getAt(getaProp(getaProp(gObjects, OBJref), #insertRect), 1)) > 0 then
set weatherName to the name of cast the castNum of sprite getaProp(getaProp(gObjects, scoreThis), #SpriteNum)
set theWeather to getaProp(getaProp(getaProp(gObjects, scoreThis), #stateList), weatherName)
set wonOnThisTry to score(#weatherObj, theWeather)
if wonOnThisTry = 1 then
if the winC of the weatherObj of gObjects = 0 then
DelObjects([#grabAndDragHotSpot])
MakeDynamic(#weatherObj, #winC, 1)
Startthetimer(1, "genExitKF #c02c")
else
if the winC of the weatherObj of gObjects = 1 then
if getaProp(getaProp(gStates, #BeenThere), #d01) then
MakeDynamic(#weatherObj, #winC, 2)
end if
else
end if
end if
end if
return 1
else
end if
return 0
end
on calcCousinsStateInt OBJref
if not voidp(gObjects) then
set myallstates to getaProp(getaProp(gObjects, OBJref), #allStates)
set refList to [#WindSpeedGraphObj, #EastWestBalloonGrafObj, #Rocketc08GraphObj]
repeat with ref in refList
set the trails of sprite getaProp(getaProp(gObjects, ref), #SpriteNum) to 1
end repeat
end
on ResetGraphSpriteTrails
set refList to [#WindSpeedGraphObj, #EastWestBalloonGrafObj, #Rocketc08GraphObj]
repeat with ref in refList
set the trails of sprite getaProp(getaProp(gObjects, ref), #SpriteNum) to 0
set the ink of sprite getaProp(getaProp(gObjects, ref), #SpriteNum) to 36
end repeat
end
on cleanUpmySeasonsAnim
set mySeasonsAnim to 17
set the loc of sprite mySeasonsAnim to point(20000, 20000)
set the castNum of sprite mySeasonsAnim to cNullSprite
set the ink of sprite mySeasonsAnim to 36
end
on calcC11grafState
if voidp(getaProp(gObjects, #ThermometerOBJ)) or voidp(getaProp(gObjects, #windspeedObj)) or voidp(getaProp(gObjects, #EastWestTempObj)) then
MakeDynamic(#weatherObj, #State, #off)
else
if (getaProp(getaProp(gObjects, #WindSpeedGraphObj), #loc) = getaProp(getaProp(gObjects, #WindSpeedGraphObj), #onloc)) and (getaProp(getaProp(gObjects, #EastWestBalloonGrafObj), #loc) = getaProp(getaProp(gObjects, #EastWestBalloonGrafObj), #onloc)) and (getaProp(getaProp(gObjects, #Rocketc08GraphObj), #loc) = getaProp(getaProp(gObjects, #Rocketc08GraphObj), #onloc)) then
MakeDynamic(#weatherObj, #State, #Access)
else
if (getaProp(getaProp(gObjects, #ThermometerOBJ), #State) = #on) or (getaProp(getaProp(gObjects, #windspeedObj), #State) = #on) or (getaProp(getaProp(gObjects, #EastWestTempObj), #State) = #on) then
MakeDynamic(#weatherObj, #State, #Graphing)
else
MakeDynamic(#weatherObj, #State, #off)
end if
end if
end if
return the State of the weatherObj of gObjects
end
on calcC11AttrState
if (getaProp(getaProp(gObjects, #ThermometerOBJ), #solved) = 1) and (getaProp(getaProp(gObjects, #windspeedObj), #solved) = 1) and (getaProp(getaProp(gObjects, #EastWestTempObj), #solved) = 1) and (getaProp(getaProp(gObjects, #WindSpeedGraphObj), #loc) = getaProp(getaProp(gObjects, #WindSpeedGraphObj), #onloc)) and (getaProp(getaProp(gObjects, #EastWestBalloonGrafObj), #loc) = getaProp(getaProp(gObjects, #EastWestBalloonGrafObj), #onloc)) and (getaProp(getaProp(gObjects, #Rocketc08GraphObj), #loc) = getaProp(getaProp(gObjects, #Rocketc08GraphObj), #onloc)) then